package mc2014.hackerthon.Dialog;

import mc2014.hackerthon.sharingphonebook.R;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;

public class GroupAddDialog extends Dialog 
{
	
	private android.view.View.OnClickListener clickListener;
	private Button addGroupBtn;
	private EditText groupNameEt;
	
	public GroupAddDialog(Context context,android.view.View.OnClickListener clickListener) 
	{
		super(context,android.R.style.Theme_Translucent_NoTitleBar);
		this.clickListener = clickListener;
	}
	
	 protected void onCreate(Bundle savedInstanceState)
	 {
	        super.onCreate(savedInstanceState);
	         
	        WindowManager.LayoutParams lpWindow = new WindowManager.LayoutParams();    
	        lpWindow.flags = WindowManager.LayoutParams.FLAG_DIM_BEHIND;
	        lpWindow.dimAmount = 0.8f;
	        getWindow().setAttributes(lpWindow);
	        
	        setContentView(R.layout.groupadd_dialog_layout);
	        
	        addGroupBtn = (Button)findViewById(R.id.groupAddBtn);
	        groupNameEt = (EditText)findViewById(R.id.group_name_et);
	        
	        addGroupBtn.setOnClickListener(clickListener);
	        
	        
	        
	  } 
	 
	 public String getGroupName()
	 {
		 return groupNameEt.getText().toString();
	 }

}
